package Day5;

/**
 * @Author kalista
 * @Description
 * @Date 2020/11/9  15:46
 **/
public class Student {

    //学号
    private   int id;
    //学生名字
    private String name;
    //学生年纪
    private int age;
    // 性别
    private String sex;
    private boolean result;
    private double a;
    private char b;

    //有参构造方法
    public Student(int id,String name,int age, String sex){
        System.out.println("我时构造我执行了");
        this.id = id;
        this.name = name;
        this.age = age;
        this.sex= sex;
    }

    //无参构造
    public Student(){
        System.out.println("f");
    }




    public void setId(int id){
        this.id = id;
    }


    public void setName(String name){
        this.name = name;
    }

    public void eat(){
        System.out.println(name + "在呼呼吃");
    }



}
